import {request} from 'umi';
const PROJECT_NAME = process.env.PROJECT_NAME;

/**
 * 列表
 * @param params params
 */
export async function findList(data: any) {
  return request(`/${PROJECT_NAME}/sys/role/findList`, {method: 'POST', data});
}

/**
 * 列表
 * @param params params
 */
 export async function getMyList(data: any) {
  return request(`/${PROJECT_NAME}/sys/role/getMyList`, {method: 'POST', data});
}


/** 新增 */
export async function saveObject(data: any) {
  return request(`/${PROJECT_NAME}/sys/role/add`, {method: 'POST', data});
}

/** 更新 */
export async function updateObject(data: any) {
  return request(`/${PROJECT_NAME}/sys/role/update`, {method: 'POST', data});
}

/** 删除 */
export async function deleteOne(data: any) {
  return request(`/${PROJECT_NAME}/sys/role/delete`, {method: 'POST', data});
}
